import axios from '@/utils/http'

// 获取所有商品分类
export function getAllCategory(params: any) {
  return axios({
    url: '/category/list',
    method: 'get',
    params: params
  })
}
// 获取level小于参数的分类
export function getLevelList(params: any) {
  return axios({
    url: '/category/levelList',
    method: 'get',
    params: params
  })
}
// 删除分类
export function delCategory(params: any) {
  return axios({
    url: '/category/del',
    method: 'get',
    params: params
  })
}
// 修改分类
export function updCategory(params: any) {
  return axios({
    url: '/category/update',
    method: 'post',
    params: params
  })
}
// 新增分类
export function addCategory(params: any) {
  return axios({
    url: '/category/add',
    method: 'post',
    params: params
  })
}


